package abstractFactory;

import abstractFactory.service.color;
import abstractFactory.service.impl.circle;
import abstractFactory.service.impl.rectangle;
import abstractFactory.service.shape;

/**
 * 形状工厂
 */
public class ShapeFactory extends AbstractFactory{
    @Override
    public color getColor(String color) {
        return null;
    }

    @Override
    public shape getShape(String shape) {
        if (shape.equalsIgnoreCase("circle")){
            return new circle();
        }else if (shape.equalsIgnoreCase("rectangle")){
            return new rectangle();
        }
        return null;
    }
}
